FROM openjdk:8u332-oracle
EXPOSE 1967
MAINTAINER reidfreestyle<313232003@qq.com>

ENV TZ Asia/Shanghai
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV LANGUAGE C.UTF-8

RUN mkdir -p /src/grule
RUN mkdir -p /src/grule/tmp/upload
ADD bin /src/grule/bin
ADD conf /src/grule/conf
ADD src /src/grule/src
ADD start.sh /src/grule/start.sh
ADD build.gradle /src/grule/build.gradle
ADD gradle /src/grule/gradle
ADD gradlew /src/grule/gradlew

WORKDIR /src/grule/

RUN chmod +x gradlew
RUN sh gradlew --no-daemon deps
WORKDIR /src/grule/
ENTRYPOINT exec sh start.sh $JAVA_OPTS
